<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <iframe src="http://www.baidu.com" frameborder="0" width="500" height="400"></iframe>
    <script>
        document.domain = 'www.baidu.com';//设置主域
    </script>
</body>

</html>